#pragma warning(disable:4996)
#pragma warning(disable:6031)

#include "Tree.h"

BTNode* buy(BTDataType n)
{
	BTNode* newnode = (BTNode*)malloc(sizeof(BTNode));
	if (newnode == NULL)
	{
		perror("malloc");
		exit(1);
	}
	newnode->data = n;
	newnode->left = newnode->right = NULL;
	return newnode;
}

void test1()
{
	BTNode* node1 = buy(1);
	BTNode* node2 = buy(2);
	BTNode* node3 = buy(3);
	BTNode* node4 = buy(4);
	node1->left = node2;
	node1->right = node3;
	node2->left = node4;
	//LevelOrder(node1);
	printf("%d\n",BTSize(node1));
}

int main()
{
	test1();
	return 0;
}